<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
| 当前目录的路由 需要路由前缀 /api/
*/

Route::get('error_403', function(){
   return error("用户已失效, 请重新登录", [], 403);
})->name("error_403");

Route::post('login','LoginController@login')->middleware('throttle:10,1');
Route::post('logout','LoginController@logout');
Route::post('redirectUri', 'LoginController@redirectUri');

//设置
Route::group(['namespace' => 'System', 'prefix' => 'system', 'middleware' => ['auth:api']], function(){
    //获取路由菜单
    Route::get('menuRoutes', 'MenuController@routes');
    //获取菜单树
    Route::get('menuTree', 'MenuController@tree');
    //保存树节点信息
    Route::post('saveMenuNode', 'MenuController@saveNode');
    //新增树节点
    Route::post('addMenuNode', 'MenuController@addMenuNode');
    //删除树节点
    Route::post('delMenuNode', 'MenuController@delMenuNode');

    //获取角色列表
    Route::post('roleList', 'RoleController@list');
    //搜索角色
    Route::post('roleSearch', 'RoleController@search');
    //新增角色
    Route::post('roleSave', 'RoleController@save');
    //角色权限
    Route::post('rolePermission', 'RoleController@permission');
    //修改权限
    Route::post('rolePermissionSave', 'RoleController@permissionSave');

    //获取用户列表
    Route::post('userList', 'UserController@list');
    //更新用户信息
    Route::post('userSet', 'UserController@set');
    //更新工厂用户信息
    Route::post('userGcSet', 'UserController@gcSet');
    //新增用户
    Route::post('userAdd', 'UserController@add');
    //新增用户--工厂
    Route::post('userGcAdd', 'UserController@gcAdd');
    //用户信息
    Route::any('user', 'UserController@user');
    //用户飞书主体
    Route::any('userSubjects', 'UserController@subjects');
    //飞书用户列表
    Route::post('userFsList', 'UserController@fsList');
    //工厂用户列表
    Route::post('userGcList', 'UserController@gcList');
    //飞书同步列表
    Route::post('userSync', 'UserController@sync');
    //飞书主体切换
    Route::post('userChangeSubject', 'UserController@changeSubject');
});

//生产
Route::group(['namespace' => 'Produce', 'prefix' => 'produce', 'middleware' => ['auth:api']], function(){
    //成品加工单管理
    Route::post('processingManageList', 'ProcessingManageController@list');
    //成品加工单管理--详情
    Route::post('processingManageDetail', 'ProcessingManageController@detail');
    //成品加工单管理--删除
    Route::post('processingManageDel', 'ProcessingManageController@del');
    //成品加工单管理--审核、同步
    Route::post('processingManageCheck', 'ProcessingManageController@check');
    //成品加工单管理--保存
    Route::post('processingManageSave', 'ProcessingManageController@save');

    //成品加工单
    Route::post('processingList', 'ProcessingController@list');
    //成品加工单--禁用、启用
    Route::post('processingOpen', 'ProcessingController@open');
    //成品加工单--推送、取消
    Route::post('processingPush', 'ProcessingController@push');
    //成品加工单--创建rfid
    Route::post('processingRfidCreate', 'ProcessingController@rfidCreate');
    //成品加工单--强制完成
    Route::post('processingEnd', 'ProcessingController@end');
    //成品加工单--设置批次
    Route::post('processingBatchSet', 'ProcessingController@batchSet');
    //成品加工单--获取加工单对应的sku
    Route::post('processingSkuList', 'ProcessingController@skuList');
    //成品加工单--采退、返修
    Route::post('processingGoodReturn', 'ProcessingController@goodReturn');
    //成品加工单--报次
    Route::post('processingBaociSet', 'ProcessingController@baociSet');
    //成品加工单--增裁
    Route::post('processingZengcSet', 'ProcessingController@zengcSet');
    //成品加工单--获取下载的excel文件
    Route::post('processingExcelList', 'ProcessingController@excelList');
    //成品加工单--获取下载缓存
    Route::post('processingExportCache', 'ProcessingController@exportCache');
    //成品加工单--下载数据
    Route::post('processingExportData', 'ProcessingController@exportData');

    //搜索加工厂
    Route::post('factorySearch', 'FactoryController@search');
    //加工厂预排--列表
    Route::post('factoryPreList', 'FactoryController@preList');
    //加工厂预排--设置
    Route::post('factoryPreSave', 'FactoryController@preSave');
    //加工厂列表
    Route::post('factoryList', 'FactoryController@list');
    //加工厂--启用、禁用
    Route::post('factoryOpen', 'FactoryController@open');
    //加工厂--推送
    Route::post('factoryPush', 'FactoryController@push');
    //加工厂--保存
    Route::post('factorySave', 'FactoryController@save');
    //加工厂--开通E签宝
    Route::post('factoryOpenEqb', 'FactoryController@openEqb');

    //批次列表
    Route::post('batchList', 'BatchController@list');
    //批次列表--修改状态
    Route::post('batchStatus', 'BatchController@status');
    //批次列表--保存
    Route::post('batchSave', 'BatchController@save');

    //面料管理
    Route::post('liningList', 'LiningController@list');
    //面料管理--删除
    Route::post('liningDel', 'LiningController@del');
    //面料管理--水洗标准
    Route::post('liningSuixiBase', 'LiningController@suixiBase');
    //面料管理--款号对应的sku
    Route::post('liningSkuList', 'LiningController@skuList');
    //面料管理--保存
    Route::post('liningSave', 'LiningController@save');

    //面料确认列表
    Route::post('liningCheckList', 'LiningController@checkList');
    //面料确认--获取打印信息
    Route::post('liningPrintInfo', 'LiningController@printInfo');
    //面料确认--确认
    Route::post('liningStatus', 'LiningController@status');

    //吊牌管理列表
    Route::post('tagList', 'TagController@list');
    //吊牌管理--删除
    Route::post('tagDel', 'TagController@del');
    //吊牌管理--sku列表
    Route::post('tagSkuList', 'TagController@skuList');
    //吊牌管理--保存
    Route::post('tagSave', 'TagController@save');

    //吊牌确认--保存
    Route::post('tagCheckList', 'TagController@checkList');
    //吊牌确认--预览
    Route::post('tagCheckPreview', 'TagController@checkPreview');
    //吊牌确认--状态
    Route::post('tagStatus', 'TagController@status');
    //吊牌确认--推送
    Route::post('tagPush', 'TagController@push');

    //执行标准/安全类别
    Route::post('safetyList', 'SafetyController@list');
    //执行标准/安全类别--删除
    Route::post('safetyDel', 'SafetyController@del');
    //执行标准/安全类别--保存
    Route::post('safetySave', 'SafetyController@save');

    //RFID查询
    Route::post('rfidSearch', 'RfidController@search');

    //RFID增裁列表
    Route::post('rfidAddList', 'RfidController@addList');

    //RFID作废列表
    Route::post('rfidCancelList', 'RfidController@cancelList');
    //RFID作废--审核
    Route::post('rfidCancelCheck', 'RfidController@cancelCheck');

    //RFID打印列表
    Route::post('rfidPrintList', 'RfidController@printList');
    //RFID打印--明细
    Route::post('rfidList', 'RfidController@list');
    //RFID统计
    Route::post('rfidCount', 'RfidController@count');
    //RFID补码
    Route::post('rfidAdd', 'RfidController@add');
    //RFID作废
    Route::post('rfidDel', 'RfidController@del');

    //qc看板
    Route::post('qcheckPanel', 'QCheckController@panel');
    //qc列表
    Route::post('qcheckList', 'QCheckController@list');
    //qc人员列表
    Route::post('qcheckRosterList', 'QCheckController@rosterList');
    //qc人员质检统计
    Route::post('qcheckRosterStatistic', 'QCheckController@rosterStatistic');
    //qc合格率 工厂 加工单
    Route::post('qcheckPassList', 'QCheckController@passList');
    //qc质检--获取下载的excel文件
    Route::post('qcheckExcelList', 'QCheckController@excelList');
    //qc质检--获取下载缓存
    Route::post('qcheckExportCache', 'QCheckController@exportCache');
    //qc质检--下载数据
    Route::post('qcheckExportData', 'QCheckController@exportData');

    //仓检看板
    Route::post('wcheckPanel', 'WCheckController@panel');
    //仓检列表
    Route::post('wcheckList', 'WCheckController@list');
    //仓检人员列表
    Route::post('wcheckRosterList', 'WCheckController@rosterList');
    //仓检人员质检统计
    Route::post('wcheckRosterStatistic', 'WCheckController@rosterStatistic');
    //仓检合格率 工厂 加工单
    Route::post('wcheckPassList', 'WCheckController@passList');
    //仓检--获取下载的excel文件
    Route::post('wcheckExcelList', 'WCheckController@excelList');
    //仓检--获取下载缓存
    Route::post('wcheckExportCache', 'WCheckController@exportCache');
    //仓检--下载数据
    Route::post('wcheckExportData', 'WCheckController@exportData');
});

//对账
Route::group(['namespace' => 'Soa', 'prefix' => 'soa', 'middleware' => ['auth:api']], function(){
    //回货单列表
    Route::post('returnsList', 'ReturnsController@list');
    //设置对账日期
    Route::post('returnsDateSet', 'ReturnsController@setDate');

    //核价单列表
    Route::post('priceOrderList', 'PriceOrderController@list');
    //核价单审核列表
    Route::post('priceOrderCheckList', 'PriceOrderController@checkList');
    //设置实付核价
    Route::post('priceOrderSetPricingExamine', 'PriceOrderController@setPricingExamine');
    //核价单审核进度
    Route::post('priceOrderApprovalProcess', 'PriceOrderController@approvalProcess');
    //提交核价审核
    Route::post('priceOrderSubmit', 'PriceOrderController@submit');

    //核价单管理--列表
    Route::post('verifyPriceList', 'VerifyPriceController@list');
    //核价单管理--删除
    Route::post('verifyPriceDel', 'VerifyPriceController@del');
    //核价单管理--锁定、解锁
    Route::post('verifyPriceLock', 'VerifyPriceController@lock');
    //核价单管理--详情
    Route::post('verifyPriceDetail', 'VerifyPriceController@detail');
    //核价单管理--设计款号
    Route::post('verifyPriceStyle', 'VerifyPriceController@style');
    //核价单管理--保存
    Route::post('verifyPriceSave', 'VerifyPriceController@save');

    //成衣对账前统计列表
    Route::post('cyStatisticList', 'CyStatisticController@list');
    //价格不变批量提交
    Route::post('cyStatisticSubmit', 'CyStatisticController@submit');

    //工序加工
    Route::post('workingList', 'WorkingController@list');
    //工序加工审核进度
    Route::post('workingApprovalProcess', 'WorkingController@approvalProcess');

    //额外费用
    Route::post('extraList', 'ExtraAmountController@list');
    //额外费用--审核进度
    Route::post('extraApprovalProcess', 'ExtraAmountController@approvalProcess');
    //额外费用--创建
    Route::post('extraCreate', 'ExtraAmountController@create');

    //罚款
    Route::post('fineList', 'FineController@list');
    //罚款--审核进度
    Route::post('fineApprovalProcess', 'FineController@approvalProcess');
    //罚款--创建
    Route::post('fineCreate', 'FineController@create');

    //返修退款
    Route::post('repairList', 'RepairController@list');
    //返修退款--对账单
    Route::post('repairMList', 'RepairController@mList');
    //返修退款--对账单--作废
    Route::post('repairMCancel', 'RepairController@cancel');
    //返修退款--对账单--审核
    Route::post('repairMCheck', 'RepairController@check');
    //返修退款--对账单--付款凭证
    Route::post('repairMPayImages', 'RepairController@payImages');
    //返修退款--对账单--详情
    Route::post('repairMDetail', 'RepairController@detail');
    //返修退款--对账单--创建
    Route::post('repairMCreate', 'RepairController@create');
    //返修退款--对账单--推送金蝶
    Route::post('repairMPush', 'RepairController@push');

    //合同列表--绣花
    Route::post('contractListXh', 'ContractController@listXh');
    //合同列表--成衣
    Route::post('contractList', 'ContractController@list');
    //合同列表--成衣--重发签署
    Route::post('contractPushSignature', 'ContractController@pushSignature');
    //合同列表--成衣--审批流程
    Route::post('contractApprovalProcess', 'ContractController@approvalProcess');
    //合同列表--成衣--附件合同
    Route::post('contractSignUrl', 'ContractController@signUrl');
    //合同列表--成衣--作废
    Route::post('contractCancel', 'ContractController@cancel');
    //合同列表--成衣--提交
    Route::post('contractSubmit', 'ContractController@submit');

    //对账单--列表
    Route::post('reconciliationList', 'ReconciliationController@list');
    //对账单--作废
    Route::post('reconciliationCancel', 'ReconciliationController@cancel');
    //对账单--推送
    Route::post('reconciliationPush', 'ReconciliationController@push');
    //对账单--推送--违约赔偿
    Route::post('reconciliationFinePush', 'ReconciliationController@pushFine');
    //对账单--推送--额外费用
    Route::post('reconciliationExtraPush', 'ReconciliationController@pushExtra');
    //对账单--付款
    Route::post('reconciliationPay', 'ReconciliationController@pay');
    //对账单--审核
    Route::post('reconciliationCheck', 'ReconciliationController@check');
    //对账单--详情
    Route::post('reconciliationDetail', 'ReconciliationController@detail');
    //对账单--保存并下一步
    Route::post('reconciliationSave', 'ReconciliationController@save');
    //对账单--确认
    Route::post('reconciliationFinish', 'ReconciliationController@finish');

    //暂估对账--列表--绣花
    Route::post('reconciliationListXhZg', 'ReconciliationController@listXhZg');
    //暂估对账--推送金蝶--绣花
    Route::post('reconciliationPushXhZg', 'ReconciliationController@pushXhZg');
    //暂估对账--详情--绣花
    Route::post('reconciliationDetailXhZg', 'ReconciliationController@detailXhZg');
});

//运营
Route::group(['namespace' => 'Om', 'prefix' => 'om', 'middleware' => ['auth:api']], function(){
    //库存分配列表
    Route::post('inventoryList', 'InventoryController@list');
    //批量平台比例
    Route::post('inventoryProportion', 'InventoryController@proportion');
    //批量平台比例--设置
    Route::post('inventorySetProportion', 'InventoryController@setProportion');
    //批量预计到货期
    Route::post('inventorySetArrivalDate', 'InventoryController@setArrivalDate');
    //获取下载的excel文件
    Route::post('inventoryExcelList', 'InventoryController@excelList');
    //获取下载缓存
    Route::post('inventoryExportCache', 'InventoryController@exportCache');
    //下载数据
    Route::post('inventoryExportData', 'InventoryController@exportData');

    //运营订单--列表
    Route::post('exportList', 'ExportController@list');
    //运营订单--搜索运营订单款号数量
    Route::post('exportSearch', 'ExportController@search');
    //运营订单--解锁、锁定
    Route::post('exportLock', 'ExportController@lock');
    //运营订单--删除
    Route::post('exportDel', 'ExportController@del');
    //运营订单--详情
    Route::post('exportDetail', 'ExportController@detail');
    //运营订单--选择款式颜色
    Route::post('exportStyleList', 'ExportController@styleList');
    //运营订单--保存
    Route::post('exportSave', 'ExportController@save');

    //渠道销售--订单明细列表
    Route::post('salesList', 'SalesController@list');
    //渠道销售--售罄率统计
    Route::post('salesSRate', 'SalesController@srate');
    //渠道销售--获取导入文件列表
    Route::post('salesExcelList', 'SalesController@excelList');
    //渠道销售--获取导入文件列表
    Route::post('salesImportCache', 'SalesController@importCache');

});

//财务
Route::group(['namespace' => 'Fd', 'prefix' => 'fd', 'middleware' => ['auth:api']], function(){
    //店铺列表
    Route::post('invoiceShops', 'InvoiceController@shops');
    //发票列表
    Route::post('invoiceList', 'InvoiceController@list');
    //开票详情
    Route::post('invoiceDetail', 'InvoiceController@detail');
    //冲红详情
    Route::post('invoiceCHDetail', 'InvoiceController@chDetail');
    //新开票详情--冲红
    Route::post('invoiceNewDetail', 'InvoiceController@newDetail');
    //发起冲红申请
    Route::post('invoiceApplyCH', 'InvoiceController@applyCH');
    //待开票列表
    Route::post('invoiceKpList', 'InvoiceController@kpList');
    //获取多合一列表
    Route::post('invoiceMoreList', 'InvoiceController@moreList');
    //设置开票、冲红
    Route::post('invoiceSetKpch', 'InvoiceController@setKpch');
    //设置开票、冲红(多开)
    Route::post('invoiceSetKpchMore', 'InvoiceController@setKpchMore');
    //修改开票信息、再次申请开票
    Route::post('invoiceSetData', 'InvoiceController@setData');
    //申请多单合一开票、修改多单合一开票信息
    Route::post('invoiceSetMoreData', 'InvoiceController@setMoreData');
    //取消多合一开票
    Route::post('invoiceCancelMore', 'InvoiceController@cancelMore');
});

//仓储
Route::group(['namespace' => 'Wms', 'prefix' => 'wms', 'middleware' => ['auth:api']], function(){
    //报次列表
    Route::post('baociList', 'BaociController@list');
    //报次详情
    Route::post('baociDetail', 'BaociController@detail');
    //报次审批
    Route::post('baociApply', 'BaociController@apply');

    //出库列表
    Route::post('itemoutList', 'ItemoutController@list');
    //出库列表--失败
    Route::post('itemoutFailList', 'ItemoutController@failList');

    //采购退货列表
    Route::post('itemReturnList', 'ItemReturnController@list');
});

//巨益
Route::group(['namespace' => 'Oms', 'prefix' => 'oms', 'middleware' => ['auth:api']], function(){
    //商品信息
    Route::post('juyiList', 'JuyiController@list');

});

//版师
Route::group(['namespace' => 'Banshi', 'prefix' => 'bs', 'middleware' => ['auth:api']], function(){
    //尺寸列表
    Route::post('sizeList', 'SizeController@list');
    //尺寸编辑
    Route::post('sizeSet', 'SizeController@set');
    //尺寸新增
    Route::post('sizeAdd', 'SizeController@add');

    //部位列表
    Route::post('positionList', 'PositionController@list');
    //部位搜索
    Route::post('positionSearch', 'PositionController@search');
    //部位修改
    Route::post('positionSet', 'PositionController@set');
    //部位新增
    Route::post('positionAdd', 'PositionController@add');

    //基码列表
    Route::post('basecodeList', 'BaseCodeController@list');
    //基码状态修改
    Route::post('basecodeStatus', 'BaseCodeController@status');
    //基码修改
    Route::post('basecodeSet', 'BaseCodeController@set');

    //方案列表
    Route::post('planList', 'PlanController@list');
    //方案状态修改
    Route::post('planStatus', 'PlanController@status');
    //方案保存
    Route::post('planSave', 'PlanController@save');
    //根据选中的服装类别和方案 出基码
    Route::post('planSelect', 'PlanController@select');

    //设计档案
    Route::post('designList', 'DesignController@list');
    //设计档案--款号详情
    Route::post('designDetail', 'DesignController@detail');
    //设计档案--款号详情--尺寸表
    Route::post('designDetailRule', 'DesignController@detailRule');
    //设计档案--款号详情--尺寸表--解锁、锁定
    Route::post('designDetailLock', 'DesignController@detailLock');
    //设计档案--款号详情--尺寸表--保存
    Route::post('designDetailRuleSave', 'DesignController@detailRuleSave');
    //设计档案--款号详情--工艺单
    Route::post('designDetailGy', 'DesignController@detailGy');
    //设计档案--款号详情--工艺单--保存
    Route::post('designDetailGySave', 'DesignController@detailGySave');
    //设计档案--款号详情--绣花BOM--保存
    Route::post('designDetailXhSave', 'DesignController@detailXhSave');
    //设计档案--款号详情--附件
    Route::post('designDetailAttach', 'DesignController@detailAttach');
    //设计档案--款号详情--附件--删除
    Route::post('designDetailAttachDel', 'DesignController@detailAttachDel');
    //设计档案--款号详情--相关资料
    Route::post('designDetailFile', 'DesignController@detailFile');
    //设计档案--款号详情--相关资料--保存
    Route::post('designDetailFileSave', 'DesignController@detailFileSave');
    //设计档案--款号详情--缩水率--保存
    Route::post('designDetailMaterialSr', 'DesignController@detailMaterialSr');
    //设计档案--停用、启用
    Route::post('designStop', 'DesignController@stop');
    //设计档案--确认流程状态
    Route::post('designCheck', 'DesignController@check');
    //设计档案--款式图片保存
    Route::post('designImageSave', 'DesignController@imageSave');
    //设计档案--保存
    Route::post('designSave', 'DesignController@save');
    //设计档案--查重
    Route::post('designDBCheck', 'DesignController@dbCheck');
    //设计档案--删除
    Route::post('designDel', 'DesignController@del');
    //设计档案--物料在用款号
    Route::post('designMaterialStyle', 'DesignController@materialStyle');

    //基础资料
    Route::group(['prefix' => 'info'], function(){
        //目标群体列表
        Route::post('targetList', 'InformationController@targetList');
        //目标群体保存
        Route::post('targetSave', 'InformationController@targetSave');

        //季节列表
        Route::post('seasonList', 'InformationController@seasonList');
        //季节保存
        Route::post('seasonSave', 'InformationController@seasonSave');

        //品牌列表
        Route::post('brandList', 'InformationController@brandList');
        //品牌保存
        Route::post('brandSave', 'InformationController@brandSave');

        //成品颜色列表
        Route::post('colourList', 'InformationController@colourList');
        //成品颜色状态设置
        Route::post('colourStateSet', 'InformationController@colourStateSet');
        //成品颜色保存
        Route::post('colourSave', 'InformationController@colourSave');

        //品类列表
        Route::post('classList', 'InformationController@classList');
        //品类保存
        Route::post('classSave', 'InformationController@classSave');

        //设计分类列表
        Route::post('categoryList', 'InformationController@categoryList');
        //设计分类保存
        Route::post('categorySave', 'InformationController@categorySave');
        //设计分类删除
        Route::post('categoryDel', 'InformationController@categoryDel');

        //设计类型列表
        Route::post('typeList', 'InformationController@typeList');
        //设计类型保存
        Route::post('typeSave', 'InformationController@typeSave');

        //文化属性列表
        Route::post('cultureList', 'InformationController@cultureList');
        //文化属性保存
        Route::post('cultureSave', 'InformationController@cultureSave');

        //商品属性列表
        Route::post('goodsList', 'InformationController@goodsList');
        //商品属性保存
        Route::post('goodsSave', 'InformationController@goodsSave');
        ///商品属性删除
        Route::post('goodsDel', 'InformationController@goodsDel');

        //套装列表
        Route::post('suitList', 'InformationController@suitList');
        //套装保存
        Route::post('suitSave', 'InformationController@suitSave');
        //套装删除
        Route::post('suitDel', 'InformationController@suitDel');

        //核价类型列表
        Route::post('ptypeList', 'InformationController@ptypeList');
        //核价类型保存
        Route::post('ptypeSave', 'InformationController@ptypeSave');
        //核价类型删除
        Route::post('ptypeDel', 'InformationController@ptypeDel');

        //核价用途列表
        Route::post('puseList', 'InformationController@puseList');
        //核价用途保存
        Route::post('puseSave', 'InformationController@puseSave');
        //核价用途删除
        Route::post('puseDel', 'InformationController@puseDel');

        //工艺类型列表
        Route::post('artsList', 'InformationController@artsList');
        //工艺类型保存
        Route::post('artsSave', 'InformationController@artsSave');
        //工艺类型删除
        Route::post('artsDel', 'InformationController@artsDel');

        //样衣工序列表
        Route::post('sampleList', 'InformationController@sampleList');
        //样衣工序保存
        Route::post('sampleSave', 'InformationController@sampleSave');
        //样衣工序删除
        Route::post('sampleDel', 'InformationController@sampleDel');

        //物料单位列表
        Route::post('munitList', 'InformationController@munitList');
        //物料单位保存
        Route::post('munitSave', 'InformationController@munitSave');
        //物料单位删除
        Route::post('munitDel', 'InformationController@munitDel');

        //物料属性
        Route::post('attribute', 'InformationController@attribute');

        //物料分类列表
        Route::post('mcategoryList', 'InformationController@mcategoryList');
        //物料分类保存
        Route::post('mcategorySave', 'InformationController@mcategorySave');
        //物料分类删除
        Route::post('mcategoryDel', 'InformationController@mcategoryDel');
    });

    //物料档案--列表
    Route::post('materielList', 'MaterielController@list');
    //物料档案--物料分类级联列表
    Route::post('materielCategory', 'MaterielController@category');
    //物料档案--删除
    Route::post('materielDel', 'MaterielController@del');
    //物料档案--保存
    Route::post('materielSave', 'MaterielController@save');
});

//借赠还内购
Route::group(['namespace' => 'Op', 'prefix' => 'op', 'middleware' => ['auth:api']], function(){
    //全员调拨列表
    Route::post('lendList', 'LendController@list');
    //个人调拨列表
    Route::post('lendMyList', 'LendController@myList');
    //取消调拨
    Route::post('lendCancel', 'LendController@cancel');
    //物流
    Route::post('lendLogistics', 'LendController@logistics');
    //借出详情
    Route::post('lendDetail', 'LendController@detail');
    //关闭借出计划
    Route::post('lendClose', 'LendController@close');
    //借赠还数量统计
    Route::post('lendStatistic', 'LendController@statistic');
    //归还所选(借出)
    Route::post('lendReturnOnly', 'LendController@returnOnly');
    //归还所选(借出)--系统处理
    Route::post('lendReturnSys', 'LendController@returnSys');
    //赠送转归还
    Route::post('lendReturnGive', 'LendController@returnGive');
    //借出转赠送
    Route::post('lendGiveLend', 'LendController@giveLend');
    //借出转赠送--系统处理
    Route::post('lendGiveLendSys', 'LendController@giveLendSys');
    //借出转内购
    Route::post('lendIpurchase', 'LendController@ipurchase');
    //创建借出、赠送调拨计划
    Route::post('lendCreatePlan', 'LendController@createPlan');
    //借出、赠送发起审批
    Route::post('lendApproval', 'LendController@approval');
    //预留解除
    Route::post('lendFree', 'LendController@free');
    //调拨转交
    Route::post('lendHandover', 'LendController@handover');
    //审批进度
    Route::post('lendApprovalProcess', 'LendController@approvalProcess');
    //调拨推送
    Route::post('lendPush', 'LendController@push');

    //全员内购列表
    Route::post('ipurchaseList', 'IpurchaseController@list');
    //个人内购列表
    Route::post('ipurchaseMyList', 'IpurchaseController@myList');
    //内购详情
    Route::post('ipurchaseDetail', 'IpurchaseController@detail');
    //内购审批
    Route::post('ipurchaseApproval', 'IpurchaseController@approval');

    //全员借转销售
    Route::post('lendsaleList', 'LendsaleController@list');
    //个人借转销售
    Route::post('lendsaleMyList', 'LendsaleController@myList');
    //借转销售详情
    Route::post('lendsaleDetail', 'LendsaleController@detail');
    //发起审批
    Route::post('lendsaleApproval', 'LendsaleController@approval');

    //获取下载的excel文件
    Route::post('lendExcelList', 'LendController@excelList');
    //获取下载缓存
    Route::post('lendExportCache', 'LendController@exportCache');
    //下载数据
    Route::post('lendExportData', 'LendController@exportData');
});

//日志
Route::group(['namespace' => 'Log', 'prefix' => 'log', 'middleware' => ['auth:api']], function(){
    //操作日志
    Route::post('list', 'LogController@list');
    //金蝶推送日志
    Route::post('kingdeeList', 'LogController@kingdeeList');
    //领猫推送日志
    Route::post('lmList', 'LogController@lmList');
    //领猫推送
    Route::post('lmPush', 'LogController@lmPush');
});

//工具
Route::group(['namespace' => 'Tool', 'prefix' => 'tool'], function(){
    //文件下载
    Route::get('fileExport', 'FileController@export');
    //文件上传
    Route::post('fileImport', 'FileController@import')->middleware(['auth:api']);

    //自动执行脚本
    Route::post('autoExecute', 'AutoController@execute')->middleware(['auth:api']);
    //自动执行脚本--执行日志
    Route::post('autoLog', 'AutoController@log')->middleware(['auth:api']);

    //工具类
    Route::post('utilsGetImg64', 'UtilsController@getImg64')->middleware(['auth:api']);
});

//微信小程序
Route::group(['namespace' => 'Wechat', 'prefix' => 'wx'], function(){
    //防伪验证--十三余小程序scheme跳转链接
    Route::any('antifakeScheme', 'AntifakeController@scheme');
    //防伪验证--获取用户授权信息
    Route::post('antifakeAuthlogin', 'AntifakeController@authlogin');
    //防伪验证--添加用户信息
    Route::post('antifakeAddUser', 'AntifakeController@addUser');
    //防伪验证--获取用户手机
    Route::post('antifakeGetPhone', 'AntifakeController@getPhone');
    //防伪验证--扫码验证
    Route::post('antifakeScancode', 'AntifakeController@scancode');
});

//消息的回调
Route::group(['namespace' => 'Callback', 'prefix' => 'cb'], function(){
    //七月夕--飞书回调
    Route::post('feishu/qyx', 'FeiShuController@qyx');
    //锦瑟--飞书回调
    Route::post('feishu/js', 'FeiShuController@js');
    //有香--飞书回调
    Route::post('feishu/yx', 'FeiShuController@yx');
    //弦木--飞书回调
    Route::post('feishu/xm', 'FeiShuController@xm');
    //妙哉--飞书回调
    Route::post('feishu/mz', 'FeiShuController@mz');
    //快哉--飞书回调
    Route::post('feishu/kz', 'FeiShuController@kz');

    //巨沃--加工单异常完结回写
    Route::post('wms/processing', 'WmsController@processing');
    //巨沃--调拨回写
    Route::post('wms/allocation', 'WmsController@allocation');
    //巨沃--拉取回货单
    Route::post('wms/pullReturnOrder', 'WmsController@pullReturnOrder');

    //数加--加工单同步按钮
    Route::post('sj/processingSync', 'ShujiaController@processingSync');

    //E签宝--签署回调
    Route::post('eqb/sign', 'EqbController@sign');

    //爱信诺--开票回调
    Route::post('nnuo/invoice', 'NNuoController@invoice');
});

//对外接口业务
Route::group(['namespace' => 'External', 'prefix' => 'ext'], function(){
    //金蝶--推送调拨单据(借、赠)
    Route::post('kingdee/pushAllocation', 'KingdeeController@pushAllocation');
    //金蝶--推送调拨单据(还)
    Route::post('kingdee/pushAllocationH', 'KingdeeController@pushAllocationH');
    //金蝶--推送调拨单据(借转销售)
    Route::post('kingdee/pushAllocationS', 'KingdeeController@pushAllocationS');
    //金蝶--推送调拨单据(借转内购)
    Route::post('kingdee/pushAllocationN', 'KingdeeController@pushAllocationN');

    //合同附件--跳转接口
    Route::get('c/{id}', 'ContractController@index');

    //唯一码打印设备--获取打印订单接口
    Route::post('print/list', 'PrintController@list');
    //唯一码打印设备--获取打印明细
    Route::post('print/detail', 'PrintController@detail');
    //唯一码打印设备--打印标签回传
    Route::post('print/status', 'PrintController@status');

    //IBOX--登陆
    Route::post('ibox/login', 'IboxController@login');
    //IBOX--获取工厂列表
    Route::post('ibox/factoryList', 'IboxController@factoryList');
    //IBOX--获取用户列表
    Route::post('ibox/userList', 'IboxController@userList');
    //IBOX--获取箱明细
    Route::post('ibox/dispatchDetail', 'IboxController@dispatchDetail');
    //IBOX--获取sku信息
    Route::post('ibox/skuInfo', 'IboxController@skuInfo');
    //IBOX--唯一码校验
    Route::post('ibox/check', 'IboxController@check');
    //IBOX--获取发货单详情
    Route::post('ibox/order', 'IboxController@order');
    //IBOX--装箱
    Route::post('ibox/setDispatch', 'IboxController@setDispatch');
    //IBOX--上传数据
    Route::post('ibox/push', 'IboxController@push');

    //qc质检系统
    Route::group(['prefix' => 'qcheck', 'middleware' => ['auth:api']], function(){
        //校验唯一码合法性
        Route::post('check', 'QCheckController@check');
        //批量合格
        Route::post('pass', 'QCheckController@pass');
        //质检不合格原因
        Route::post('reason', 'QCheckController@reason');
        //批量不合格
        Route::post('unpass', 'QCheckController@unpass');
        //单个扫码
        Route::post('scan', 'QCheckController@scan');
    });
});

//年会派对
Route::group(['namespace' => 'Party', 'prefix' => 'party'], function(){
    //所有人员
    Route::post('list', 'PartyController@list');
    //全部重置
    Route::post('reset', 'PartyController@reset');
    //设置已被抽取状态
    Route::post('setPull', 'PartyController@setPull');
    //礼品列表
    Route::post('prizes', 'PartyController@prizes');
    //领取奖品
    Route::post('draw', 'PartyController@draw');
    //打乱礼品清单
    Route::get('shuffle', 'PartyController@shuffle');
    //导出礼品清单
    Route::get('download', 'PartyController@download');
});


Route::group(['namespace' => 'Debug', 'prefix' => 'debug'], function(){
    Route::any('test', 'DebugController@test');
});


